//
// Created by 吴喆 on 2020/3/1.
//

#ifndef SUMMER_MANAGER_H
#define SUMMER_MANAGER_H


#include <exception>

#include "engine/Gui.h"
#include "engine/Game.h"
#include "engine/Time.h"
#include "engine/Input.h"

#include "util/Lock.h"
#include "util/Console.h"
#include "util/ConfigUtil.h"


class Game;

// 服务器状态
enum class programState {
    Starting, Running, Closing
};

class Manager {

public:
    programState state;

    static Manager *getInstance();

    void init();

    void early();

    void input();

    void render();

    void late();

    void quit();

    void logic();

    void onResize(GLFWwindow *win, int width, int height);

private:
    Manager() = default;

    static Manager *manager;
    GLFWwindow *win;
    Gui *gui;
    CTime *cTime;
    summer::Game *game;
};


#endif //SUMMER_MANAGER_H
